package br.fatec.model.entity;

import java.io.Serializable;

import javax.persistence.Embeddable;
import javax.persistence.FetchType;
import javax.persistence.ForeignKey;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;

@Embeddable
public class Semiacabado_MateriaprimaId implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = -1395391291566258975L;

	@ManyToOne(fetch = FetchType.EAGER)
	@JoinColumn(nullable=false, updatable=false, foreignKey=@ForeignKey(name="fk_semiacabado_cod"))
	private Semiacabado semiAcabado;
	
	@ManyToOne(fetch = FetchType.EAGER)
	@JoinColumn(nullable=false, updatable=false, foreignKey=@ForeignKey(name="fk_materiaprima_cod"))
	private MateriaPrima materiaPrima;

	public Semiacabado getSemiAcabado() {
		return semiAcabado;
	}

	public void setSemiAcabado(Semiacabado semiAcabado) {
		this.semiAcabado = semiAcabado;
	}

	public MateriaPrima getMateriaPrima() {
		return materiaPrima;
	}

	public void setMateriaPrima(MateriaPrima materiaPrima) {
		this.materiaPrima = materiaPrima;
	}
	
}
